


<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script type='text/javascript' src='<%=path%>/frame/orgSelect/js/ajaxInitSelect.js'></script>
<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
</head>
<body>
<html:form styleId="yfPlacefileForm" action="addYfPlacefile.do?method=addYfPlacefile" onsubmit="return save();">
<table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="margtb5">
		    <tr>
		      <td align="left" class="padl5 lan12"><img src="<%=path%>/images/img-11.gif" width="12" height="12">项目管理 &gt; 项目验收 &gt; 资料归档</td>
		    </tr>
       </table>

		<table cellspacing="1" cellpadding="0" width="98%" align="center"  border="0" class="bgcolor2 margb5">
                    <tr>
		       <td colspan="4" align="left" class="bkuang zi13b bgcolor2 padl5">资料归档信息</td>
		    </tr>
       <tr class="bgcolor">
              <td width="18%" align="right" class="zi13">项目编号：</td>
			   <td width="32%"  align="left" class="pad2 zi13">
			      ${yfPlacefile.projectNo}
			 </td>
		       <td width="18%" align="right" class="zi13">项目名称：</td>
			   <td width="32%"  align="left" class="pad2 zi13">
			        ${yfPlacefile.projectName}
			    </td>
		    
		  </tr> 
     
          <tr class="bgcolor">
 		       <td width="18%" align="right" class="zi13">项目机构：</td>
			   <td width="32%"  align="left" class="pad2 zi13"> 
			   <ssh:select propertyName="projectOrg" firstShow="Y" dataSource="collection" selectList="${orgSelect}"  type="3" defaultName="${yfPlacefile.projectOrg}"/>
			      </td>
		    <td width="18%" align="right" class="zi13">发起年份：</td>
			   <td width="32%"  align="left" class="pad2 zi13">
			      ${yfPlacefile.initiateYear}
			 </td>
		  </tr> 
		  
		   <tr class="bgcolor">
 		     
		    <td width="18%" align="right" class="zi13">资料总数：</td>
			   <td width="32%" colspan="3" align="left" class="pad2 zi13">
			      ${yfPlacefile.fileNum}
			 </td>
		  </tr> 
		  
		    
 
    </table> 
    
      <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">立项书</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="lxs" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						    <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
  <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">外协合同</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="wxht" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">项目计划书</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="xmjhs" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">概要设计</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="gysj" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
					
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">详细设计</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="xxsj" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
					
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">中试</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="zs" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					<br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">软件子系统代码</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="rjzxt" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
                 <br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">硬件原理图</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="yjylt" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					
					
					 <br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">硬件PCB</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="yjpcb" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					
					 <br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">开发注意事项</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="kfzysx" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					
					 <br>
					 <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
					  <tr>
					     <td colspan="4" class="bkuang bgcolor2 zi13b padl5">BOM清单</td>
			
					  </tr>
					  <tr>
					    <td align="center" width="30%" class="bgcolor3 brkuang zi13b">附件名称</td>
					      <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传人</td>
					    <td align="center" width="20%" class="bgcolor3 brkuang zi13b">上传时间</td>
					    <td align="center" width="30%" class="bgcolor3 bkuang zi13b">操作</td>
					  </tr>
					  <logic:iterate name="bom" id="attachment">
					  	  <tr>
						    <td align="center" class="brkuang zi13">${attachment.filename}</td>
						     <td align="center" class="brkuang zi13">${attachment.rname}</td>
						    <td align="center" class="brkuang zi13"><bean:write name="attachment" property="inputtime" format="yyyy-MM-dd" /></td>
						    <td align="center" class="bkuang padl5 zi13"><a href="#" onclick="delAttachment('${attachment.id}','${attachment.fid}','${attachment.type}','${attachment.operateid}')">删除</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="download('${attachment.id}')">下载</a></td>
					      </tr>
					  </logic:iterate>
					</table>
					</html:form>
		<p><p><p>
		<html:form styleId="attachmentForm" action="/uploadAttachment.do?method=uploadAttachment" method="post" enctype="multipart/form-data">
		   <table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
		    <tr>
		       <td colspan="4" align="left" class="bkuang zi13b bgcolor2 padl5">添加附件</td>
		    </tr>
		           <tr>
				    <td width="30%" align="right" class="brkuang zi13">资料类型：<font color="red">*&nbsp;</font></td>
				    <td width="70%" align="left" class="bkuang pad2 zi13">
				        <ssh:select propertyName="type" pid="FILE_TYPE" type="1" defaultName="${yfPlacefileForm.type}" />
				   </td>
				  </tr>
				  <tr>
				    <td width="30%" align="right" class="brkuang zi13">备注：<font color="red">*&nbsp;</font></td>
				    <td width="70%" align="left" class="bkuang pad2 zi13">
				         <textarea rows="3" cols="50" id="bak3" name="bak3" flag="true"  valid="required|limitLength" max="100" errMsg="请输入备注信息|备注输入长度不能超过100个汉字"></textarea> 
				    </td>
				  </tr>
				  <tr>
				    <td width="30%" align="right" class="brkuang zi13">附件：</td>
				    <td width="70%" align="left" class="bkuang pad2 zi13">
				        <html:file property="formFile" size="30"></html:file>  
				    <input type="button" onclick="upload();" name="Submit" value="上传" class="buttonbg"></td>
				  </tr>
				  <tr>
				    <td align="right" class="rkuang zi13">上传要求：</td>
				    <td align="left" class="padl5 zi13">允许上传多个附件（单个附件大小不能超过10MB）。 </td>
				  </tr>
				</table>
				<input type="hidden" name="bak1" id="bak1"/>
				<input type="hidden" name="fid" id="fid" value="${yfPlacefile.id}"/>
				
					<p><p><p>
	    <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
   <input class="buttonbg" id="but_return"  style="cursor:hand"  type="button" value="<bean:message key='com.manager.common.yfplacefile.return' bundle="yfplacefile"/>" name="but_return" onClick="javascript:history.go(-1);"/>
    </td>
  </tr>
</table>

</html:form>
</body>
</html>


<script>

function upload(){
 
  var syncHelper = new SyncHelper();
 var type = syncHelper.selectedValue("type");
  if(type==null || type==""){
          alert("请选择资料类型！");
          return false;
   }
  if(validateForm(document.forms[1],'Y'))
  {
   
	  var projectNo = '${yfPlacefile.projectNo}';
	  $('bak1').value = projectNo;
	  document.forms['attachmentForm'].action="placeFileUpload.do?method=placeFileUpload";
	  document.forms['attachmentForm'].submit();
  }


}


function download(id){
    
    <c:if test="${loginUser.isMoreYFJL=='true' && xzQX == 'true'}">
        window.location.href = "downPlaceFile.do?method=downPlaceFile&id=" + id;
    </c:if>
    <c:if test="${loginUser.isMoreYFJL=='false' ||  xzQX == 'false'}">
        alert("没有下载权限！");
    </c:if>
   
}

function delAttachment(id,fid,type,operateid){
    var curid = '${loginUser.id}';
    var bussName = "${yfPlacefile.id}";
    if(curid != operateid){
       alert("只有删除自己上传的附件！");
       return false;
    }
    window.location.href = "deletePlaceFile.do?method=deletePlaceFile&id=" + id + "&fid=" + fid + "&type=" + type + "&bussName=" + bussName;
}
</script>





